﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CRM.Controller;

namespace CRM.Web.Admin
{
    public partial class BrandCaseDetails : System.Web.UI.Page
    {
        ArticleInfoController articleInfoController = new ArticleInfoController();

        private int Id = 0;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["Id"] != null)
            {
                int.TryParse(Request.QueryString["Id"].ToString(), out Id);
            }
            if (!IsPostBack)
            {
                BindData();
            }
        }

        protected void BindData()
        {
            if (Id > 0)
            {
                var newsInfo = articleInfoController.GetSingle(Id);
                this.ltNewsContent.Text = newsInfo.ArticleContent;
                this.ltNewsTitle.Text = newsInfo.Title;                
            }
        }
    }
}